]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Generate a versioned dependency for the GLib 2.86 transition
authorSimon McVittie <smcv@debian.org>
Thu, 18 Sep 2025 09:38:19 +0000 (10:38 +0100)
committerSimon McVittie <smcv@debian.org>
Thu, 18 Sep 2025 09:38:19 +0000 (10:38 +0100)
GNOME Shell will need to be rebuilt after GLib 2.86 is uploaded to
unstable, so that its typelibs declare a dependency on GioUnix, which
they do not when built against older GLib. Generate a versioned
dependency so that this can be done via either a binNMU or a sourceful
upload.

debian/clean
debian/control
debian/extra-substvars.sh [new file with mode: 0755]
debian/rules

index 3d6866b9167a653e15e32d533050087515e54cda..1789feeee985c94ce3fb24ab2b13732e263c9f5b 100644 (file)
@@ -1 +1,2 @@
+debian/local.substvars
 debian/home/
index 675e5b65f01f4d81904414dd1072c156c66c149d..a24dee6c89a448d2def100854272948d98490960 100644 (file)
@@ -111,6 +111,7 @@ Depends: gir1.2-accountsservice-1.0,
          python3,
          tecla,
          ${gir:Depends},
+         ${local:Depends},
          ${misc:Depends},
          ${shlibs:Depends}
 Recommends: bolt,
diff --git a/debian/extra-substvars.sh b/debian/extra-substvars.sh
new file mode 100755 (executable)
index 0000000..959c28f
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+# Copyright 2025 Simon McVittie
+# SPDX-License-Identifier: MIT
+
+glib_version=$(dpkg-query -W -f '${Version}' "libglib2.0-dev:$DEB_HOST_ARCH")
+
+if dpkg --compare-versions "$glib_version" ge 2.86; then
+    echo "local:Depends=gir1.2-glib-2.0 (>= 2.86.0)"
+else
+    echo "local:Depends=gir1.2-glib-2.0 (<< 2.86.0)"
+fi
index 9e1e2daadaf86936789bc3e1b67be88118cffd6b..4ad1b7f39cf599bed6d2bdb48ebbad274621a5b8 100755 (executable)
@@ -67,3 +67,9 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 endif
 
 override_dh_gnome_clean:
+
+debian/local.substvars:
+       dpkg-architecture -c debian/extra-substvars.sh > $@
+
+override_dh_gencontrol: debian/local.substvars
+       dh_gencontrol -- -Tdebian/local.substvars